<!doctype html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gbk">
    </head>
<body>
    <input type="hidden" id="ieudp">
<script>
var sSrc = location.search.split("?")[1],
aSw = (typeof sSrc === "undefined" ? "": sSrc).toLowerCase().split("&"),
i = 0,
oSw = {},
tmp,
udp = {},
_ca_qs_ = {
    acs: function() {
        return
    }
},
_f = Math.floor(Math.random() * 999),
_r = encodeURIComponent(document.referrer),
/*- 原代码 -*/
/*
requrl = {
    create: ["http://acookie.tanx.com/1.gif?cache=" + _f + "&pre=" + _r],
    other: ["http://acookie.taobao.com/1.gif?cache=" + _f + "&pre=" + _r, "http://acookie.alimama.com/1.gif?cache=" + _f + "&pre=" + _r],
    syn: ["http://hz.mmstat.com/syncAcookie.php?cna=", "http://acookie.alimama.com/syncAcookie.php?cna=", "http://acookie.tanx.com/syncAcookie.php?cna=", "http://acookie.taobao.com/syncAcookie.php?cna="]
},
*/
/*- 本地代码 -*/
requrl = {
    create: ["../../acookie.tanx.com/1.gif?cache=" + _f + "&pre=" + _r],
    other: ["../../acookie.taobao.com/1.gif?cache=" + _f + "&pre=" + _r, "../../acookie.alimama.com/1.gif?cache=" + _f + "&pre=" + _r],
    syn: ["../../hz.mmstat.com/syncAcookie.php?cna=", "../../acookie.alimama.com/syncAcookie.php?cna=", "../../acookie.tanx.com/syncAcookie.php?cna=", "../../acookie.taobao.com/syncAcookie.php?cna="]
},
cc,
ls,
loop = 6,
looptime = 500;
window.onload = function() {
    oSw.ls = true;
    oSw.ud = true;
    oSw.gs = true;
    for (; i < aSw.length; i++) {
        tmp = aSw[i].split("=");
        oSw[tmp[0]] = tmp[1] == "1" ? true: false
    }
    udp.debug = 0;
    udp.log = function(n, m, o) {
        if (!udp.debug) {
            return
        }
        if (!o) {
            o = "JS"
        }
        if (!m) {
            m = "info"
        }
        n = "[" + new Date().getTime() + "] ::: " + n;
        if (window.console && console.log) {
            console.log(n)
        }
        if (udp.logger) {
            udp.logger.innerHTML += n + "<br/>"
        }
    };
    var j = location.pathname.split("/");
    j[j.length - 1] = "";
    udp.path = j.join("/");
    if ( !! (window.attachEvent && !window.opera) && oSw.ud) {
        udp.ud = true;
        udp.udObj = document.getElementById("ieudp");
        udp.udObj.addBehavior("#default#userData");
        udp.udPath = encodeURIComponent(udp.path)
    }
    udp.lsObj = oSw.ls ? window.localStorage: false;
    udp.gsObj = oSw.gs ? window.globalStorage: false;
    udp.udSet = function(n, m, q) {
        if (udp.ud) {
            var o = a(m, q);
            udp.udObj.setAttribute(n, o);
            try {
                udp.udObj.save(udp.udPath)
            } catch(p) {
                return false
            }
            return true
        }
    };
    udp.udGet = function(m) {
        if (udp.ud) {
            try {
                udp.udObj.load(udp.udPath)
            } catch(n) {
                return
            }
            return l(m, udp.udObj.getAttribute(m))
        }
        return false
    };
    udp.lsSet = function(n, m, q) {
        if (udp.lsObj) {
            var o = a(m, q);
            try {
                udp.lsObj.setItem(n, o)
            } catch(p) {
                return false
            }
            return true
        }
        return false
    };
    udp.lsGet = function(m) {
        if (udp.lsObj) {
            try {
                return l(m, udp.lsObj.getItem(m))
            } catch(n) {
                return
            }
        }
        return
    };
    udp.gsSet = function(n, m, q) {
        if (udp.gsObj) {
            var o = a(m, q);
            try {
                udp.gsObj[location.hostname][n] = o
            } catch(p) {
                return false
            }
            return true
        }
        return false
    };
    udp.gsGet = function(m) {
        if (udp.gsObj) {
            try {
                return l(m, upp.gsObj[m])
            } catch(n) {
                return
            }
        }
        return false
    };
    function k(n, q, m) {
        var p = udp.udSet(n, q, m);
        var o = udp.lsSet(n, q, m);
        var r = udp.gsSet(n, q, m);
        return p || o || r
    }
    function b(n) {
        var m = udp.lsGet(n);
        if (!h(m)) {
            m = udp.udGet(n);
            if (!h(m)) {
                m = udp.gsGet(n)
            }
        }
        return h(m) ? m: false
    }
    function d(m) {
        if (typeof udp.udObj != "undefined") {
            udp.udObj.removeAttribute(m);
            udp.udObj.save(udp.udPath)
        }
        if (typeof udp.lsObj != "undefined") {
            udp.lsObj.removeItem(m)
        }
        if (typeof udp.gsObj != "undefined") {
            delete udp.gsObj[location.hostname][m]
        }
        return true
    }
    function a(n, m) {
        return encodeURIComponent(n) + ":" + (new Date().getTime() + (m == null ? 365 * 10 : m) * 24 * 60 * 60 * 1000) + ":" + (new Date().getTime())
    }
    function l(o, n) {
        if (n) {
            if (parseInt(n.split(":")[1]) > new Date().getTime()) {
                var m = decodeURIComponent(n.split(":")[0]);
                return m
            } else {
                d(o);
                return
            }
        } else {
            return
        }
    }
    function h(m) {
        return (m || "").length > 23
    }
    function g(q) {
        var o = document.cookie.split("; "),
        p = 0,
        n = "",
        m = "",
        r = "";
        for (; p < o.length; p++) {
            r = o[p].split("=");
            if (r[0] === q) {
                return h(r[1]) ? r[1] : false;
                break
            }
        }
        return
    }
    function c(o, p) {
        if (!h(p)) {
            udp.log("synAcookie error,syn value:" + p);
            return
        }
        var n, m = 0;
        for (; m < o.length; m++) {
            n = document.createElement("script");
            n.src = o[m] + p.toString();
            document.getElementsByTagName("head")[0].appendChild(n);
            udp.log("syn acookie to " + n.src)
        }
    }
    function f(m) {
        udp.log("create acookie start");
        for (tmp = 0; tmp < m.length; tmp++) { (function() {
                var n = new Image();
                n.id = (1000 * Math.random()).toString() + (new Date()).getTime().toString();
                n.src = m[tmp].toString();
                udp.log("create " + m[tmp].toString())
            })()
        }
    }
    cc = g("cna");
    ls = b("cna");
    if (cc) {
        udp.log("get acookie success " + cc);
        if (ls) {
            udp.log("get localStorage success " + ls);
            if (ls != cc) {
                udp.log("syn acookie from ls");
                c(requrl.syn, ls)
            }
        } else {
            k("cna", cc, null);
            udp.log("get ls fail, set ls = " + cc)
        }
    } else {
        udp.log("get acookie fail");
        if (ls) {
            c(requrl.syn, ls);
            udp.log("get ls " + ls + ",syn acookie from ls")
        } else {
            udp.log("get ls fail, create acookie");
            f(requrl.create);
            tmp = 1;
            var e = setInterval((function() {
                udp.log("start loop :" + tmp);
                cc = g("cna");
                tmp += 1;
                if (tmp == loop || cc) {
                    clearInterval(e);
                    k("cna", cc, null);
                    udp.log("loop endl ,set ls = " + cc);
                    f(requrl.other)
                }
            }), looptime)
        }
        udp.debug && setTimeout(function() {
            udp.log("cna=" + g("cna") + ";localStorage=" + b("cna"))
        },
        2000)
    }
};
</script>
</body>
</html>